#include<stdio.h>
void main(void) {
	int num[3] = { 0, 0, 0 };
	int sum = 0;
	int i = 0;
	while (1) {
		printf("please input your number  \r\n");
		scanf_s("%d,%d,%d", &num[0], &num[1], &num[2]);
		if (num[0] <= 0 || num[1] <= 0 || num[2] <= 0) { break; }
		for (i = 0;i < 3;i++) {
			if (num[i] > 10) {
				num[i] = 10;
			}
		}
		for (i = 0;i < 3;i++)
		{
			sum = sum + num[i];

		}
		for (i = 0;i < 3;i++)
		{
			if (num[i] == 1 && (sum + 10) < 21) {
				sum = sum + 10;
			}
		}
		if (sum > 21) {
			printf("GAME IS OVER\r\n");
		}
		else {
			printf("sum=%d\r\n", sum);
		}

		sum = 0;


	}

}